package com.hkfn.rfb.common.utils;

import android.content.Context;
import android.widget.Toast;

public class ToastUtils {
    /**
     * 显示一个短toast
     * @param context
     * @param showContent
     */
    public static void showToast(Context context, String showContent){
        showToast(context, showContent, true);
    }
    /**
     * 显示一个toast
     * @param context
     * @param showContent
     */
    public static void showToast(Context context, String showContent, boolean isShort){
        if (StringUtils.isEmpty(showContent)){
            return;
        }
        Toast toast;
        if (isShort){
            toast = Toast.makeText(context, showContent, Toast.LENGTH_SHORT);
        }else {
            toast = Toast.makeText(context, showContent, Toast.LENGTH_LONG);
        }
        toast.show();
    }
}
